function isSpam(number) {
  let [country, area,] = number.split(' ');
  area = +area.slice(1, -1);
  if (country.length > 3 || country[1] !== '0') {
    return true;
  }
  if (area > 900 || area < 200) {
    return true;
  }
  const nums = {}
  for (const char of number.slice(2)) {
    if ("() -".includes(char)) {
      continue;
    }
    if (nums.hasOwnProperty(char)) {
      nums[char]++;
    } else {
      nums[char] = 1;
    }
  }
  for (const char in nums) {
    if (nums[char] >= 4) {
      return true;
    }
  }
  return false;
}


console.log(isSpam("+00 (555) 234-0182"))
console.log(isSpam("+0 (555) 135-0192"))